<?php
use yii\widgets\ActiveForm;
use yii\jui\AutoComplete;
use yii\helpers\Html;
use backend\assets\PurchaseaddAsset;
use yii\jui\DatePicker;
PurchaseaddAsset::register($this);
?>
<div class="widget-box">
			<div class="widget-header widget-header-blue widget-header-flat">
				<h4 class="widget-title lighter">入库单添加</h4>
			</div>
<?php 
	$form  = ActiveForm::begin([
			'id'=>'addinfo-form',
			'fieldConfig'=>[
				'template'=>'{label}<div class="col-sm-6"><div class="clearfix">{input}</div></div>{hint}{error}',
				'labelOptions'=> ['class'=> 'col-xs-3 control-label no-padding-right'],
				'inputOptions'=> ['class' => 'col-xs-12'],
			],
	]);
?>
	<div class="widget-body">
		<div class="widget-main">
			<div id="fuelux-wizard-container" class="no-steps-container">
							<!--逐条添加库存  start -->
					<div class="col-sm-3">
						<?= $form->field($model,'billcode')->textInput(['value'=>date('Ymdhis'),'readonly'=>'readonly'])?>
					</div>
			
					<div class="col-sm-3" style="height:60px">
						<?= $form->field($model,'suppliername')->dropDownList($suppliername,['prompt'=>''])
						?>
					</div>
			
					<div class="col-sm-3" style="height:60px">
						<?= $form->field($model,'merchandisename')->dropDownList($merchandisename,['prompt'=>''])?>
					</div>
			
					<div class="col-sm-3" style="height:60px">
						<?= $form->field($model,'handler')->widget(AutoComplete::className(),[
								'clientOptions'=>[
								'source'=>$handler
								]
						])?>
					</div>
	
					<div class="col-sm-3" style="height:60px">
						<?= $form->field($model,'intype')->dropDownList([
							'0'=>'正常入库',
							'1'=>'报损',
							'2'=>'报溢'
							])?>
					</div>
	
					<div class="col-sm-3" style="height:60px">
						<?= $form->field($model,'intime')->widget(DatePicker::className(),[	
									'language' => 'zh_cn',
									'dateFormat' => 'yyyy-MM-dd',
						])?>
					</div>
				
					<div class="col-sm-3" style="height:60px">
						<?= $form->field($model,'price')->textInput()?>
					</div>
			
					<div class="col-sm-3" style="height:60px">
						<?= $form->field($model,'num')->textInput()?>
					</div>
				
					<div class="col-sm-3"  style="height:60px">
						<?= $form->field($model,'totalmoney')->textInput(['readonly'=>'readonly'])?>
					</div>
		
					<div class="col-sm-3" style="height:60px">
						<?= $form->field($model,'remark')->textInput()?>
					</div>
								<!--逐条添加库存   end-->
				<div class="wizard-actions">
					<?= Html::submitButton('提交', ['class'=>'btn btn-prev','id'=>'addRow']) ?>
					<?= Html::resetButton('重置',['class'=>'btn btn-success btn-next'])?>
				</div>
			</div>
		</div>
	</div>
</div>
<?php $form = ActiveForm::end()?>
							<!-- 库存清单列表   start-->
<div class="row">
			<div class="col-xs-12">										
				<div class="clearfix">
					<div class="pull-right tableTools-container"></div>
				</div>
				<div class="table-header">
					入库单
				</div>
				<!-- div.table-responsive -->
				<!-- div.dataTables_borderWrap -->
				<div>
					<table id="dynamic-table" class="table table-striped table-bordered table-hover">
						<!-- 
										<thead>
							<tr>
								<th class="" style="width:100px;text-align:center">
									<label class="pos-rel">
										<input type="checkbox" class="ace" />
										<span class="lbl"></span>
									</label>
								</th>
								<th>入库单号</th>
								<th>供应商编码</th>
								<th>经手人</th>
								<th>入库方式</th>			
								<th>单价</th>			
								<th>入库数量</th>
								<th>备注</th>
								<th>操作</th>
							</tr>
						</thead> 
						 -->
				 		<tfoot>
				 			<th colspan=10></th>
							<th style="width:100px;text-align:center">
								<button class="btn btn-info btn-sm popover-info"  id="submitAll">批量入库</button>
							</th>			
						</tfoot>
					</table>
				</div>
			</div>
</div>
												<!-- 库存清单列表   end-->
												
												